/*
package com.budwk.app.sys.commons.task;

import cn.hutool.core.lang.TypeReference;
import com.alibaba.fastjson.JSON;
import com.budwk.app.sqfw.dto.TransferServiceRecordDTO;
import com.budwk.app.sqfw.models.Sqfw_servicerecord;
import com.budwk.app.sys.models.Sys_task;
import com.budwk.app.sys.services.SysTaskService;
import com.budwk.starter.job.annotation.SJob;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.extern.slf4j.Slf4j;
import org.nutz.dao.Cnd;
import org.nutz.integration.jedis.pubsub.PubSubService;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.util.List;
import java.util.Map;

*/
/**
 * @author wizzer@qq.com
 *//*

@IocBean(name = "taskJob",singleton = false)
@Slf4j
public class TaskJob {
    @Inject
    PubSubService pubSubService;

    @Inject
    SysTaskService sysTaskService;

   */
/* @Inject
    SqfwServicerecordService sqfwServicerecordService;

    @Inject
    SqfwWorkorderService sqfwWorkorderService;

    @Inject
    SysUserService sysUserService;

    @Inject
    HuaweiOssService huaweiOssService;

    @Inject
    SqfwCopyrecordService sqfwCopyrecordService;*//*





    @SJob("createTaskJob")
    public void createTaskJob(JobExecutionContext jobExecutionContext) throws JobExecutionException {

        Cnd cnd=Cnd.NEW();
        cnd.and("disabled","=",false);
        cnd.and("flag","=","create");
        List<Sys_task> listTask=sysTaskService.query(cnd);
        for (Sys_task sysTask:listTask) {
        try {
        Map<String, String> map = JSON.parseObject(sysTask.getParams(), new TypeReference<Map<String, String>>() {});
        ObjectMapper objectMapper = new ObjectMapper();
        TransferServiceRecordDTO transferServiceRecordDTO = objectMapper.readValue(map.get("transferServiceRecordDTO"), TransferServiceRecordDTO.class);
        String ImgId = objectMapper.readValue(map.get("imgId"), String.class);
        Sqfw_servicerecord sqfw_servicerecord = objectMapper.readValue(map.get("sqfwservicerecord"), Sqfw_servicerecord.class);
        sysTaskService.quartzCreateServiceRecord(sqfw_servicerecord,transferServiceRecordDTO,ImgId);
            } catch (JsonProcessingException e) {
                throw new RuntimeException(e);
            }
        }


    }
}
*/
